package com.jinkaimen.goodcash.ui.holder;

import android.widget.TextView;

import com.ht.baselibs.ui.base.BaseViewHolder;
import com.ht.baselibs.utils.DateUtils;
import com.jinkaimen.goodcash.R;
import com.jinkaimen.goodcash.bean.WithDrawListItemBean;
import com.jinkaimen.goodcash.utils.NumberUtils;

public class WithdrawViewHolder extends BaseViewHolder<WithDrawListItemBean> {
    private TextView mDateView;
    private TextView mNumberView;
    private TextView mMoneyberView;

    public WithdrawViewHolder() {
        super(R.layout.list_withdraw_item);
    }

    @Override
    protected void initView() {
        mDateView = findViewById(R.id.tv_list_withdraw_item_date);
        mNumberView = findViewById(R.id.tv_list_withdraw_item_number);
        mMoneyberView = findViewById(R.id.tv_list_withdraw_item_money);
    }

    @Override
    protected void refreshView(WithDrawListItemBean withDrawListBean) {
        mDateView.setText(DateUtils.formatDate(withDrawListBean.settleDate));
        mNumberView.setText(withDrawListBean.number+"笔");
        mMoneyberView.setText(NumberUtils.getTwoBit(withDrawListBean.settleAmount)+"元");
    }
}
